#ifndef __CZF_REBAR_H__
#define __CZF_REBAR_H__

#include "SimpleWnd.h"
#include <commctrl.h>

#define DEFAULT_REBAR_CTL_STYLE (RBS_BANDBORDERS | RBS_VARHEIGHT| RBS_AUTOSIZE)
#define DEFAULT_REBAR_WND_STYLE (WS_BORDER|WS_CHILD|WS_CLIPCHILDREN|WS_CLIPSIBLINGS|WS_VISIBLE)

class CFrameWnd;
class CReBar : public CWnd
{
public:
   CReBar();
   ~CReBar();
   
   BEGIN_MSG_MAP(CReBar)
   END_MSG_MAP()
   
   HWND Create(HWND hParentWnd, 
               RECT& rcPos,
               UINT uID,
               DWORD dwCtrlStyle =  DEFAULT_REBAR_CTL_STYLE,
               DWORD dwStyle = DEFAULT_REBAR_WND_STYLE);
   
	BOOL AddBar(HWND hBar, LPCTSTR pszText = NULL, HBITMAP pbmp = NULL,
		DWORD dwStyle = RBBS_GRIPPERALWAYS | RBBS_FIXEDBMP | RBBS_CHILDEDGE);
	BOOL AddBar(HWND hBar, COLORREF clrFore, COLORREF clrBack,
		LPCTSTR pszText = NULL, DWORD dwStyle = RBBS_GRIPPERALWAYS | RBBS_CHILDEDGE);

   void SetFrame(CFrameWnd* pFrame);

protected:
   BOOL _AddBar (HWND hBar, REBARBANDINFO* lpBandInfo);

   CFrameWnd* m_pFrame;
};
#endif
